#ifndef __DATA_BUS__
#define __DATA_BUS__

#include <inttypes.h>

class DataBusMember
{
public:
  DataBusMember (uint16_t address_base);

  uint16_t get_address_base () const { return _address_base; }

  virtual uint8_t read (uint16_t address);
  virtual void write (uint16_t address, uint8_t data);

  static void attach_member (DataBusMember& bus, DataBusMember& member);

private:
  uint16_t _address_base;
  DataBusMember* _next;
};

#endif /* __DATA_BUS__ */
